﻿<%@ Page Title="" Language="C#" MasterPageFile="~/HomeFull.master" AutoEventWireup="true" CodeFile="ChiTietDienDan.aspx.cs" Inherits="ChiTietDienDan" %>

<%@ Register Src="~/Controls/CMT.ascx" TagPrefix="uc1" TagName="CMT" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="NoiDungTren" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="NoiDungOGiua" runat="Server">
    <div class="row">
        <div class="col-md-12">
            <ul class="breadcrumb">
                <li><a href="#"><span class="glyphicon glyphicon-home"></span></a></li>
                <li><a href="#"> Rao vặt</a>
                    <asp:HyperLink ID="HyperLink1" runat="server">HyperLink</asp:HyperLink>
                </li>
            </ul>
        </div>
    </div>
    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
        <ItemTemplate>
            <div class="row">
                <div class="col-md-12 tintuc">
                    <h1>
                        <asp:Label ID="TieuDe" runat="server" Text='<%# Eval("Tieude") %>'></asp:Label>
                    </h1>
                    <hr />


                    <asp:Image ID="HinhAnh" runat="server" ImageUrl='<%# "~/"+Eval("Img1") %>' />

                    <p>
                        <asp:Label ID="NoiDung" runat="server" Text='<%# Eval("NoiDung") %>'></asp:Label>
                    </p>
                    <hr />

                    <uc1:CMT runat="server" ID="CMT" />
                    <div class="news-cmt">
                        <h3>Bình luận :</h3>
                        <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource3">

                            <ItemTemplate>
                                <div class="media">
                                    <a href="#" class="pull-left">
                                        <asp:Image ID="HinhDaiDien" CssClass="media-object" runat="server" Height="64px" Width="64px" ImageUrl="~/Images/avat.png" />
                                    </a>
                                    <div class="media-body">
                                        <p><strong>
                                            <asp:Label ID="TieuDeCMT" runat="server" Text='<%# Eval("Ten") %>'></asp:Label></strong> </p>
                                        <p>
                                            <asp:Label ID="NoiDungCMT" runat="server" Text='<%# Eval("NoiDung") %>'></asp:Label>
                                        </p>

                                    </div>
                                </div>

                            </ItemTemplate>
                        </asp:Repeater>
                        <asp:SqlDataSource ID="SqlDataSource3" runat="server"
                            ConnectionString="<%$ ConnectionStrings:QLBSConnectionString %>"
                            SelectCommand="SELECT * FROM [BinhLuanDienDan] WHERE ([IDBanTin] = @IDBanTin)">
                            <SelectParameters>
                                <asp:QueryStringParameter QueryStringField="matin" Name="IDBanTin" Type="Int32"></asp:QueryStringParameter>
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>
                </div>
            </div>
        </ItemTemplate>
    </asp:Repeater>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:QLBSConnectionString %>"
        SelectCommand="SELECT * FROM [DienDan] WHERE ([IDBaiViet] = @IDBaiViet)">
        <SelectParameters>
            <asp:QueryStringParameter Name="IDBaiViet" QueryStringField="matin" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="NoiDungBenTrai" runat="Server">
    <div class="col-md-12" style="padding-top: 30px;">
        <div class="panel panel-info">
            <div class="panel-heading">
                <h2 class="panel-title">Thông tin</h2>
            </div>
            <div class="panel-body">
                <asp:Repeater ID="Repeater2" runat="server" DataSourceID="SqlDataSource2">
                    <ItemTemplate>
                        <p>
                            Mã bảng tin :<strong>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("IDBaiViet") %>'></asp:Label></strong>
                        </p>
                        <p>
                            Người đăng: <strong>
                                <asp:Label ID="NguoiDang" runat="server" Text='<%# Eval("NguoiBan") %>'></asp:Label></strong>
                        </p>
                        <p>
                            SDT: <strong>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("SDT") %>'></asp:Label></strong>
                        </p>
                        <p>
                            Phạm vi rao: <strong>
                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("PhamVi") %>'></asp:Label></strong>
                        </p>
                        <p>
                            Giá bán: <strong>
                                <asp:Label ID="Label4" runat="server" Text='<%# Eval("GiaBan") %>'></asp:Label></strong>
                        </p>
                    </ItemTemplate>
                </asp:Repeater>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server"
                    ConnectionString="<%$ ConnectionStrings:QLBSConnectionString %>"
                    SelectCommand="SELECT * FROM [DienDan] WHERE ([IDBaiViet] = @IDBaiViet)">
                    <SelectParameters>
                        <asp:QueryStringParameter Name="IDBaiViet" QueryStringField="matin" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </div>
        </div>
    </div>
</asp:Content>

